<script setup>
import { inject } from 'vue'

 const countChild = inject('count')
 const updateCount = inject('updateCount')
</script>

<template>
  <div class="child-page">
    我是子组件: {{ countChild }}
   <button @click="updateCount(20)">改数字</button>
  </div>
</template>

<style scoped></style>
